// 创建路由器模块
import Vue from 'vue'
// 引入vue-router
import VueRouter from 'vue-router'
// 引入路由组件
import ShouYe from '../views/ShouYe.vue'
import FenLei from '../views/FenLei.vue'
import ZhuCe from '../views/ZhuCe.vue'
import GouWu from '../views/GouWu.vue'

// 声明使用vue插件
Vue.use(VueRouter);
export default new VueRouter({
    mode: 'history',
    // 注册路由
    routes: [
        {
            path: '/shouye', // 代表的是根目录   最好不要出现大写字符
            name: 'shouye',  // 路由的名字
            component: ShouYe
        },
        {
            path:'/fenlei',
            name:'fenlei',
            component:FenLei
        },
        {
            path:'/zhuce',
            name:'zhuce',
            component:ZhuCe
        },
        {
            path:'/gouwu',
            name:'gouwu',
            component:GouWu
        }
    ]
})